NavigationSpec

sealed class NavigationSpec

Deprecated

This feature has been deprecated. It is recommended to use Compose Multiplatform instead.

Spec used by Navigator to determine how to perform Navigation

Inheritors

Types

Link copied to clipboard
data class Activity<A : Activity>(val activityClass: Class<A>, val flags: Set<IntentFlag> = emptySet(), val launchType: NavigationSpec.Activity.LaunchType = LaunchType.NoResult) : NavigationSpec

Navigates to a new android.app.Activity The Navigator automatically adds the NavigationBundle of the NavigationAction as a Bundle to its Intent

Link copied to clipboard
data class Browser(val url: URL, val viewType: NavigationSpec.Browser.Type) : NavigationSpec

Opens the browser

Link copied to clipboard
data class Camera(val type: NavigationSpec.Camera.Type, val requestCode: Int, val uri: Uri?) : NavigationSpec

Shows the Camera

Link copied to clipboard
data class Close(val result: Int? = null) : NavigationSpec

Closes the current android.app.Activity

Link copied to clipboard
object Companion
Link copied to clipboard
data class Contract<Input, Activity : Activity>(val activityClass: KClass<Activity>, val input: Input, val provideResultLauncher: Activity.() -> ActivityResultLauncher<Input>) : NavigationSpec

Navigates using an ActivityResultLauncher

Link copied to clipboard
data class CustomIntent(val intent: Intent) : NavigationSpec

Navigates according to a given Intent

Link copied to clipboard
data class Dialog(val tag: String? = null, val getFragmentManager: ActivityLifecycleSubscribable.LifecycleManager.() -> FragmentManager = { fragmentManager }, val createDialog: () -> DialogFragment) : NavigationSpec
Link copied to clipboard
data class DismissDialog(val tag: String, val fragmentRequestKey: String? = null, val getFragmentManager: ActivityLifecycleSubscribable.LifecycleManager.() -> FragmentManager = { fragmentManager }) : NavigationSpec

Dismisses a DialogFragment with a given Tag

Link copied to clipboard

Shows the Email app

Link copied to clipboard
data class FileSelector(val requestCode: Int, val fileSelectorSettings: NavigationSpec.FileSelector.FileSelectorSettings) : NavigationSpec

Opens a File Selector

Link copied to clipboard
data class Fragment(@IdRes val containerId: Int, val type: NavigationSpec.Fragment.Type = Type.Replace, val tag: String? = null, val backStackSettings: NavigationSpec.Fragment.BackStackSettings = BackStackSettings.DontAdd, val animationSettings: NavigationSpec.Fragment.AnimationSettings? = null, val getFragmentManager: ActivityLifecycleSubscribable.LifecycleManager.() -> FragmentManager = { fragmentManager }, val createFragment: () -> Fragment) : NavigationSpec
Link copied to clipboard
data class Phone(val type: NavigationSpec.Phone.Type, val phoneNumber: String) : NavigationSpec

Opens up the Phone screen

Link copied to clipboard
data class PopFragment(val immediate: Boolean = false, val fragmentRequestKey: String? = null, val getFragmentManager: ActivityLifecycleSubscribable.LifecycleManager.() -> FragmentManager = { fragmentManager }) : NavigationSpec

Pops a Fragment from the backstack

Link copied to clipboard
data class PopFragmentTo(val name: String, val inclusive: Boolean, val immediate: Boolean = false, val fragmentRequestKey: String? = null, val getFragmentManager: ActivityLifecycleSubscribable.LifecycleManager.() -> FragmentManager = { fragmentManager }) : NavigationSpec

Pops a Fragment from the backstack

Link copied to clipboard
data class RemoveFragment(val tag: String, val fragmentRequestKey: String? = null, val getFragmentManager: ActivityLifecycleSubscribable.LifecycleManager.() -> FragmentManager = { fragmentManager }) : NavigationSpec

Removes a Fragment with a given tag

Link copied to clipboard

Opens the Settings screen

Link copied to clipboard

Opens the Text messenger screen

Link copied to clipboard
data class ThirdPartyApp(val packageName: String, val openMode: NavigationSpec.ThirdPartyApp.OpenMode = OpenMode.FALLBACK_TO_STORE) : NavigationSpec

Opens a Third Party app if installed on the phone or navigates to the store if it does not exist.